package com.github.thinwonton.spring.utils;

import java.util.UUID;

public class TokenProcessor {
	private static TokenProcessor instance;

	private TokenProcessor() {
	}

	public static TokenProcessor getInstance() {
		if (instance == null) {
			synchronized (TokenProcessor.class) {
				if (instance == null) {
					instance = new TokenProcessor();
				}
			}
		}
		return instance;
	}

	/**
	 * 生成token
	 * @return
	 */
	public String generate() {
		return UUID.randomUUID().toString();
	}
}
